﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using FbKPI.Model;
using FbKPI.Controller;

namespace FbKPI.Facade
{
    public class SubSectionFacade
    {
        public string Save(SubSection subsections)
        {
            SubSectionController cont = new SubSectionController();
            return cont.Save(subsections);
        }

        public string Delete(SubSection subsections)
        {
            SubSectionController cont = new SubSectionController();
            return cont.Delete(subsections);
        }

        public IList<SubSection> GetAll(string sSearch, int PageNumber, int DataLength, string SortCol, string SortDirection, out int TotalData, int BusinessGroupID)
        {
            IList<SubSection> subsections = new List<SubSection>();
            SubSectionController cont = new SubSectionController();
            subsections = cont.GetAll(sSearch, PageNumber, DataLength, SortCol, SortDirection, out TotalData, BusinessGroupID);
            return subsections;
        }

        public IList<SubSection> GetAllSubSectionBySectionID(string sSearch, int SectionID, int PageNumber, int DataLength, int SortCol, string SortDirection, out int TotalData)
        {
            IList<SubSection> subsections = new List<SubSection>();
            SubSectionController cont = new SubSectionController();
            subsections = cont.GetAllSubSectionBySectionID(sSearch, SectionID, PageNumber, DataLength, SortCol, SortDirection, out TotalData);
            return subsections;
        }

        public SubSection GetSubSectionByID(int ID)
        {
            SubSection subsections = new SubSection();
            SubSectionController cont = new SubSectionController();
            subsections = cont.GetSubSectionByID(ID);
            return subsections;
        }
        
        public SubSection GetSubSectionByDescription(string SubSectionDescription)
        {
            SubSection subsections = new SubSection();
            SubSectionController cont = new SubSectionController();
            subsections = cont.GetSubSectionByDescription(SubSectionDescription);
            return subsections;
        }
    }
}